import { useMemo } from "react";
interface TSvgIconProps {
	size?: number;
	name: string;
	color?: string;
}
const SvgIcon = (props: TSvgIconProps) => {
	const { size = 16, name, color } = props;
	const symbolId = useMemo(() => `#${name}`, [name]);
	return (
		<svg aria-hidden="true" width={size} height={size} fill={color}>
			<use href={symbolId} fill={color} />
		</svg>
	);
};

export default SvgIcon;
